{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Homework1- PETE 2060\n",
    "### Run the code in the first cell when you doing your assignment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Current Time: Mon, 15 Jan 2018 03:14:28\n",
      "Hardware Info: uname_result(system='Windows', node='PC-20170929WLJS', release='7', version='6.1.7601', machine='AMD64', processor='Intel64 Family 6 Model 60 Stepping 3, GenuineIntel')\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "import platform\n",
    "print(\"Current Time:\",time.strftime(\"%a, %d %b %Y %H:%M:%S\", time.gmtime()))\n",
    "print(\"Hardware Info:\",platform.uname())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Q1. Write a program to print your personal info  as the following format:\n",
    "```\n",
    "Name: [Last Name] [First Name]\n",
    "LSU email: xx@lsu.edu\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Name: Wang Bin\n",
      "LSU email: bxw1153@lsu.edu\n"
     ]
    }
   ],
   "source": [
    "print(\"Name: Wang Bin\")\n",
    "print(\"LSU email: bxw1153@lsu.edu\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Q2. Write ONE line code to print the following test content as the following format (hint: using \\n \\t):\n",
    "```\n",
    "[Last Name]  [First Name]\n",
    "             Test2    Test3\n",
    "Test4        Test5    Test6\n",
    "``` "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wang\tBin\n",
      "\tTest2\tTest3\n",
      "Test4\tTest5\tTest6\n"
     ]
    }
   ],
   "source": [
    "print(\"Wang\\tBin\\n\\tTest2\\tTest3\\nTest4\\tTest5\\tTest6\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Q3. Write a program to finish following task:\n",
    "##### 1: Define a variable of x = the number of letters in your name \n",
    "e.g. ${x=15}$\n",
    "##### 2: Compute and print the solution of the following equation (hint: input, str(val))\n",
    "$${{e}^{2}}+\\frac{\\sqrt{\\ln 5+{{\\log }_{10}}x}}{2}$$\n",
    "\n",
    "e.g. The solution of the above equation with x of 15 is 55.432645265528734 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The solution of the above equation with x of 15 is 55.37074131623281\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "x=15\n",
    "print(\"The solution of the above equation with x of \" + str(x) + \" is \" +str(np.exp(2)**2+np.sqrt(np.log(5)+np.log10(6))/2) )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#### Q4. \n",
    "##### 1 Use array to define three array/list to store well name, daily oil production and location\n",
    "|Well Name| Oil Pro (stb/day)|(Latitude,Longitude)|\n",
    "|------|------|------|\n",
    "|   LA12  | 334| (123.11,343.31)|\n",
    "|   LA21  | 534| (713.61,546.11)|\n",
    "|   LA44  | 274| (353.91,566.81)|\n",
    "|   LA62  | 1334| (223.11,333.31)|\n",
    "|   LA71  | 7834| (213.61,346.31)|\n",
    "|   LA24  | 974| (823.91,796.21)|\n",
    "|   LA46  | 8334| (333.11,503.33)|\n",
    "|   LA78  | 6534| (163.61,596.17)|\n",
    "|   LA84  | 4274| (353.93,586.86)|\n",
    "##### 2 Use the value from the defined array, write/using code to print out a SUMMARY REPORT of this oil field\n",
    "###### 2.3 The number of well in this oil field\n",
    "###### 2.2 Total daily oil production rate\n",
    "###### 2.3 The index, well name, oil production rate, and location in the above list of the nearest well to LA44\n",
    "\n",
    "Summary Report Example\n",
    "```\n",
    "[Last Name] Oil Field\n",
    "Number of Wells: 23\n",
    "Total daily production rate: 33341 stb/day\n",
    "The nearest well to LA44 is: [index] [Well Name] [Oil Production rate] [Location]\n",
    "``` "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "WellName=['LA12','LA21','LA44','LA62','LA71','LA24','LA46','LA78','LA84']\n",
    "WellPro=[334,534,274,1334,7834,974,8334,6534,4274]\n",
    "WellLocation=[(123.11,343.31),(713.61,546.11),(353.91,566.81),(223.11,333.31),(213.61,346.31),(823.91,796.21),(333.11,503.33),(163.61,596.17),(353.93,586.86)]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
